﻿@inject IBlogService Service
@inject IClientUriGenerator UrlGenerator

@using AcBlog.Data.Models.Builders

<span class="itemdisplay">
    <span class="mdi mdi-folder">
        @for (int i = 0; i < Data.Items.Count; i++)
        {
            CategoryBuilder builder = new CategoryBuilder();
            builder.AddSubCategory(Data.Items.Take(i + 1).ToArray());
            <a href="@UrlGenerator.Category(builder.Build())" style="color: inherit;">@Data.Items[i]</a>
            <span>/</span>
        }
    </span>
</span>

@code {
    [Parameter]
    public Category Data { get; set; }
}
